# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Dan McGee <dan@archlinux.org>

pkgname=irssi
pkgver=1.4.4
pkgrel=1
pkgdesc='Modular text mode IRC client with Perl scripting'
url='https://irssi.org/'
arch=('x86_64')
license=('GPL')
depends=('glibc' 'glib2' 'openssl' 'libotr' 'perl' 'ncurses' 'libncursesw.so')
makedepends=('meson' 'ninja')
optdepends=('perl-libwww: for the scriptassist script')
replaces=('irssi-otr')
backup=('etc/irssi.conf')
source=(https://github.com/irssi/irssi/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz{,.asc})
sha512sums=('da28ac7a527be301d0615d6d733e4cf4e09bb6d4f5c70bc33ff70e22439a01f197bb5d91b4432ca74d3ac2dbb3235f30d53efc63a4279de8664923c2ccdbdbea'
            'SKIP')
validpgpkeys=('7EE65E3082A5FB06AC7C368D00CCB587DDBEF0E1') # The Irssi project <staff@irssi.org>

build() {
  cd ${pkgname}-${pkgver}
  arch-meson Build \
    -Dwith-perl-lib=vendor \
    -Dwith-proxy=yes \
    -Dwith-otr=yes \
    -Dwith-perl=yes \
    -Denable-true-color=yes
  ninja -C Build
}

package() {
  cd ${pkgname}-${pkgver}
  DESTDIR="${pkgdir}" ninja -C Build install
  install -Dm 644 irssi.conf "${pkgdir}"/etc/irssi.conf
}

# vim: ts=2 sw=2 et:
